{% extends "panel/panel_base.html" %}
{% block extra_head %}

{% endblock %}
{% block panel_title%}New Image in "{{ugallery.title|truncatewords:2}}"{% endblock %}
{% block panel_content %}
{% if errors %}
	<div id="gen_error_message">
		Errors: 
		<ul>
			{% if title_error %}<li>The title field is required.</li>{% endif %}
			{% if description_error %}<li>The description field is required.</li>{% endif %}
			{% if image_error %}<li>The image field is required.</li>{% endif %}				
		</ul>
	</div>
{% endif %}
{% if success %}
	<div id="gen_success">
		<ul>
			<li>Image Successfully Added, click <a style="text-decoration: underline;" href="http://fblaconnection.com/panel/{{user.username}}/gallery/{{ugallery.slug}}/">here</a> to return to gallery.</li>
			<li>Or click <a style="text-decoration: underline;" href="http://fblaconnection.com/panel/{{user.username}}/gallery/{{ugallery.id}}/add/image/">here</a> to add another image.</li>			
		</ul>
	</div><br />
{% else %}

<form enctype="multipart/form-data" action="http://fblaconnection.com/panel/{{user.username}}/gallery/{{ugallery.id}}/add/image/" method="post">
	<table>
	{{form}}
	<td>
			<input type="submit" name="save" class="register_button" value="Save &rarr;">
	</td>
	</table>
</form>

{% endif %}
{% endblock %}